package com.sw.dubbo.zy.impl;

import com.sw.dubbo.api.IHumanService;
import com.sw.study.web.util.RequestContext;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

/**
 * @author wodezuiaishinageren
 */
@Service
public class HumanServiceImpl implements IHumanService {
    @Override
    public String sayHello() {
        Object ip = RpcContext.getContext().getAttachment("ip");
        System.out.println(ip);
        return ",i am person, receive ip:"+ ip;
    }
}
